package com.ruoyi.business.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.business.domain.Evaluation;
import com.ruoyi.business.domain.bo.EvaluationBo;
import com.ruoyi.business.domain.vo.EvaluationVo;
import com.ruoyi.business.domain.vo.HomeworkStuAnswerVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author 最爱喝兽奶
 * @create 2022/9/29
 **/
public interface EvaluationMapper extends BaseMapper<Evaluation> {

    /**
     * 根据传入作业id，查询出所有上交作业的学生id
     * @param homeworkId
     * @return
     */
    List<String> selectUserIdsByHomeworkId(@Param("homeworkId") String homeworkId);

    /**
     * 分页查询互评信息
     * @param buildPage
     * @param bo
     * @return
     */
    Page<EvaluationVo> selectByPage(@Param("page") Page<EvaluationBo> buildPage, @Param("bo") EvaluationBo bo);

    /**
     * 根据互评信息来查询问题的id
     * @param bo
     * @return
     */
    List<HomeworkStuAnswerVo> queryQuestionByEvaluation(EvaluationBo bo);
}
